<?php

/**
 * Name: 反馈验证层
 * User: Silent
 * Date: 2025-10-11
 * Time: 22:08:50
 */

namespace App\Http\Requests\Message;

use Illuminate\Foundation\Http\FormRequest;

class FeedbackRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'content' => 'required|string',
            'phone'   => 'required|string',
            'type'    => 'required|string',
        ];
    }

    public function messages(): array
    {
        return [
            'phone.required' => '手机号不能为空',
            'content.required'   => '问题描述不能为空',
            'type.required' => '类型不能为空',
        ];
    }
}
